package com.kukudexin.demo.controller;

import com.jfinal.aop.AopManager;
import com.jfinal.aop.Inject;
import com.kukudexin.demo.service.AccountService;
import com.kukudexin.demo.service.impl.AccountServiceImpl;

/**
 * @author: 德鑫
 * @version:
 * @since: 2021/4/26
 */
public class AccountController {
    @Inject
    AccountService accountService;    // 此处会注入依赖对象

    public static void main(String[] args) {
//        AccountService accountService = Aop.get(AccountService.class);
//        AopManager.me().addMapping(...) 的用途是为接口、抽象类指定被注入的具体实现类。
        AopManager.me().addMapping(AccountService.class, AccountServiceImpl.class);
//        AopManager.me().addSingletonObject();

    }
    //AopManager.me().addMapping(Service.class, MyService.class);
}
